import { ApiVersoin } from '@/common/enums/httpEnum'

const Url = {
  lockList: `${ApiVersoin.V4}/customer/my-lock-list`,
  lockInfo: `${ApiVersoin.V4}/customer/lock-info`,
  lockCheck: `${ApiVersoin.V4}/customer/lock-check`,
  validateCode: `/customer/validate-change-lock-password-code`,
  modifyPass: `${ApiVersoin.V4}/customer/new-change-lock-password`,
  customerUnlock: `/customer/unlock`,
  sendTempPwd: `/smart-lock/send-temp-pwd`,
}

/*
 *定位当前所有门店
 */
export const lockList = (params) => uni.$uv.http.get(Url.lockList, { params, custom: { showLoading: true } })
/*
 *获取门锁信息
 */
export const lockInfo = (params) => uni.$uv.http.get(Url.lockInfo, { params, custom: { showLoading: true } })
/*
 *修改门锁效验接口
 */
export const lockCheck = (params) => uni.$uv.http.get(Url.lockCheck, { params, custom: { showLoading: true } })

/*
 *验证修改门锁验证码
 */
export const validateCode = (params) => uni.$uv.http.post(Url.validateCode, params, { custom: { showLoading: true } })
/*
 *新版租客修改门锁密码
 */
export const modifyPass = (params) => uni.$uv.http.post(Url.modifyPass, params, { custom: { showLoading: true } })
/*
 *一件开门
 */
export const customerUnlock = (data) => uni.$uv.http.post(Url.customerUnlock, data, { custom: { showLoading: true } })
/*
 *下发临时密码
 */
export const sendTempPwd = (params) => uni.$uv.http.post(Url.sendTempPwd, params, { custom: { showLoading: true } })
